<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Yogette's New Product Form</title>
        <link type="text/css" href="<?php echo base_url(); ?>/yogette/css/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />
        <script type="text/javascript" src="<?php echo base_url(); ?>/yogette/js/jquery-1.6.4.js"></script>	
        <script type="text/javascript" src="<?php echo base_url(); ?>/yogette/js/jquery-ui-1.8.16.custom.min.js"></script>
        <link href="<?php echo base_url(); ?>/yogette/css/yogette.css" rel="stylesheet" type="text/css"/>

    </head>
    <body class="body-user" style="background-color: white ">
        <div class="main-wrapper-reg" style="position: inherit; height: auto">
            <img class="pinkcircle" src="<?php echo base_url(); ?>yogette/images/pinkCircle.jpg" />
            <div class="Container"></div>
            <div class="menulist">
                <ul class="menulist-ul">
                    <li><img class="ice-cream" src="<?php echo base_url(); ?>yogette/images/logoIcon.jpg"/><a href="/yogette/member"><img src="<?php echo base_url(); ?>yogette/images/mainboard.jpg" class="home" alt="Yogette's Homepage"/></a></li>
                </ul>
            </div>
            <div class="reg-form" >

                <h1>New Product Form<span class="important-field-desc"><br/>(*)Means the field is Mandatory</span></h1>
                <!-- First will open a form to the register_user function to post the inputs -->
                <!-- define all required variables for inputs -->
                <?php
                echo form_open(base_url() . 'yogette/menu/add_product');
                $sku = array(
                    'name' => 'sku',
                    'id' => 'sku',
                    'value' => set_value('sku')
                );
                $product_name = array(
                    'name' => 'product_name',
                    'id' => 'product_name',
                    'value' => set_value('product_name')
                );
                $slug = array(
                    'name' => 'slug',
                    'id' => 'slug',
                    'value' => set_value('slug')
                );
                $routid= array(
                    'name' => 'routid',
                    'id' => 'routid',
                    'value' => set_value('routid')
                );
                
                $product_desc = array(
                    'name' => 'product_desc',
                    'id' => 'product_desc',
                    'value' => set_value('product_desc')
                );
                $excerpt = array(
                    'name' => 'excerpt',
                    'id' => 'excerpt',
                    'value' => set_value('excerpt')
                );
                $p_price = array(
                    'name' => 'p_price',
                    'id' => 'p_price',
                    'value' => set_value('p_price')
                );
                
                $p_sale_price = array(
                    'name' => 'p_sale_price',
                    'id' => 'p_sale_price',
                    'value' => set_value('p_sale_price')
                );
                $p_tax = array(
                    'name' => 'p_tax',
                    'id' => 'p_tax',
                    'value' => set_value('p_tax')
                );
                $weight = array(
                    'name' => 'weight',
                    'id' => 'weight',
                    'value' => set_value('weight')
                );
                $credit_card_type = array(
                    'MasterCard' => "Master Card",
                    'VISA' => "VISA",
                    'AmericanExpress' => "American Express Card",
                    'DinersClub' => "Diners Club",
                    'Discover' => "Discover",
                    'JCB' => "JCB"
                );
                $p_stock = array(
                    'name' => "p_stock",
                    'id' => "p_stock",
                    'value' => set_value('p_stock')
                );
                
                $p_type = array(
                    'All' => "All",
                    'Breakfast' => "Breakfast",
                    'Launch' => "Launch",
                    'Dinner' => "Dinner"
                );
                $menuname = array(
                    'name' => "menuname",
                    'id' => "menuname",
                    'value' => set_value('menuname')
                );
                $p_image = array(
                    'name' => "p_image",
                    'id' => "p_image",
                    'value' => set_value('p_image')
                );
                $options = array(
                    'name' => 'options',
                    'id' => 'options',
                    'value' => set_value('options')
                );
                
                ?>
                <!-- Get all required inputs to the form -->
                <!-- submit these variables to the form and close it to be processed-->
                <ul class="login_form-ul">
                    <li>
                        <label>Sku<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($sku); ?>
                        </div>
                    </li>
                    <li>
                        <label>Slug<span class="important-field"></span></label>
                        <div>
                            <?php echo form_input($slug); ?>
                        </div>
                    </li>
                    <li>
                        <label>Route ID<span class="important-field"></span></label>
                        <div>
                            <?php echo form_input($routid); ?>
                        </div>
                    </li>
                    
                    <li>
                         <label>Product Name<span class="important-field">*</span></label>
                         <div>
                            <?php echo form_input($product_name); ?>
                        </div>
                    </li>
                    <li>
                         <label>Product Description<span class="important-field">*</span></label>
                         <div>
                            <?php echo form_input($product_desc); ?>
                        </div>
                    </li>
                    <li>
                        <label>Excerpt<span class="important-field"></span></label>
                        <div>
                            <?php echo form_input($excerpt); ?>
                        </div>
                    </li>    
                    <li>
                        <label>Product Price<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($p_price); ?>
                        </div>
                    </li>
                    <li>
                        <label>Product Sale Price<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($p_sale_price); ?>
                        </div>
                    </li>
                    <li>
                        <label>Price Tax<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($p_tax); ?>
                        </div>
                    </li>
                    <li>
                        <label>Product Weight<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($weight); ?>
                        </div>
                    </li>
                    <li>
                        <label>Menu Type<span class="important-field">*</span></label>
                        <div>
                            <select name="menuname">
                            <option value="">Menu Type</option>
                                <?php foreach ($array as $row):?>    
                            <option value="<?php echo $row['m_type'];?>">
                                <?php echo $menuname = $row['m_type'];?>
                            </option>
                                <?php endforeach;?>
                            </select>

                             <?php form_hidden('menuname', $menuname); ?>
                        
                        </div>
                    </li>
                    <li>
                        <label># in Stock<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($p_stock); ?>
                        </div>
                    </li>
                    <li>
                        <label>Product Type<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_dropdown('p_type', $p_type, 'Product Type'); ?>
                        </div>
                    </li>
                    
                    <li>
                        <label>Product's Options<span class="important-field"></span></label>
                        <div>
                            <?php echo form_input($options); ?>
                        </div>
                    </li>
                     <li>
                        <label title="Enter only the name of the product picture">Product's Image<span class="important-field">*</span></label>
                        <div >
                            <?php echo $error;?>
                            <?php echo form_open_multipart(base_url() . 'yogette/upload/do_upload');?>
                            
                            <input style="margin: 0em 0em 0em 6em" type="file" name="p_image" size="20" />
                            
                        </div>
                    </li>
                
                    
                    <li>
                        <div>
                            <?php echo validation_errors(); ?>
                        </div>    
                    </li>
                    <li>
                        <?php echo form_submit(array('name' => 'submit'), 'Add Product'); ?>
                    </li>
                </ul>
                <?php echo form_close(); ?>
            </div>
        </div>

            <!-- footer start-->
            <div class="pre-footer" >   
            </div>
            <div class="footer">
                <div>
                    <p class="footer-p1">yogurt is healthy</p>
                </div>
                <div>
                    <p class="footer-p2">Copyright &COPY; 2010 YOGETTE.</p>
                </div>
            </div>
            <img class="post-footer" src="<?php echo base_url(); ?>yogette/blank.jpg" id="blank" name="blank" /> 
            <!-- footer ends-->
      </body>
</html>